<!--user login-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	
	<title><?php echo $L['php_env_check'].' - '.$L['kod_name'].$L['kod_power_by'];?></title>
	<link href="<?php echo STATIC_PATH;?>images/common/favicon.ico" rel="Shortcut Icon">
	<link href="<?php echo STATIC_PATH;?>style/common.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet"/>
	<link href="./static/style/font-awesome/css/font-awesome.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet">
	<!--[if IE 7]>
	<link rel="stylesheet" href="./static/style/font-awesome/css/font-awesome-ie7.css">
	<![endif]-->
	<link href="<?php echo STATIC_PATH;?>style/login.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet">
</head>

<body>
	<?php 
		$arr = array(8);
		$get = $arr[mt_rand(0,count($arr)-1)];
		$image = STATIC_PATH."images/wall_page/".$get.".jpg";
		echo '<img class="background" src="'.$image.'" />';
		echo '<style type="text/css">.title{background: #6699cc url('.$image.') 0px -92px;}</style>';
	?>
	<div class="loginbox" >
		<div class="title">
			<div class="logo"><i class="icon-cloud"></i><?php echo $L['kod_name'];?></div>
			<div class='info'>——<?php echo $L['kod_name_desc'];?></div>
			<div class="menu_group">
				<a id='footer_language' data-toggle="dropdown" href="javascript:void(0);" class="topbar_menu">
				<i class='font-icon icon-flag'></i>Language<b class="caret"></b>
				</a>
				<ul class="dropdown-menu footer_language pull-left animated menuShow" role="menu" aria-labelledby="footer_language">
					<?php 
				  		$tpl = "";
				  		foreach ($config['setting_all']['language'] as $key => $value) {
				  			$name = $value[0];
				  			$select = LANGUAGE_TYPE == $key ? "this":"";
				  			$tpl .= "<li><a href='javascript:core.language(\"{$key}\");' title=\"{$key}/{$value[1]}/{$value[2]}\" class='{$select}'><i class='lang-flag flag-{$key}'></i>{$name}</a></li>";
				  		}
						echo $tpl;
					?>
				</ul>
			</div>
		</div>
		<div class="form" style="padding: 10px 20px;">
			<h3><?php echo $L['php_env_check'];?></h3>
			<?php
	            $error = php_env_check();
	            $login = $L['login'];
	            if ($error=='') {
	            	$login_info = str_replace(array("{0}","{1}","{2}"),array('admin','demo/demo','guest/guest'),$L['install_user_default']);
	            	echo '<div class="success"><h4>Successful!</h4>',$L['install_login'],'<br/>'.$login_info.'</div>';
	            }else{
	            	echo '<div class="error"><h4>error:</h4>'.$error.'</div>';
	            	$login = $L['php_env_error_ignore'];
	            }
	            echo '<div class="inputs admin_password"><input type="text" placeholder="'.$L['login_root_password'].'" autocomplete="off"/></div>';
	            echo '<div class="guest"><a href="javascript:void(0);" class="start">'.$login.'</a></div>';
	        ?>
		</div>
	</div>

<?php include(TEMPLATE.'common/footer.html');?>
<script type="text/javascript" src="./index.php?share/common_js#id=<?php echo rand_string(8);?>"></script>
<script type="text/javascript" src="<?php echo STATIC_PATH;?>js/lib/seajs/sea.js?ver=<?php echo KOD_VERSION;?>"></script>
<script type="text/javascript" >
	seajs.config({
		base: "<?php echo STATIC_PATH;?>js/",
		preload: ["lib/jquery-1.8.0.min"],
		map:[
			[ /^(.*\.(?:css|js))(.*)$/i,'$1$2?ver='+G.version]
		]
	});
	seajs.use("<?php echo STATIC_JS;?>/src/user/main");
</script>

</body>
</html>
